# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=so
pkgver=0.4.9
pkgrel=1
pkgdesc="Terminal interface for Stackoverflow"
url="https://github.com/samtay/so"
arch="all"
license="MIT"
makedepends="cargo openssl-dev cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/samtay/so/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/so -t "$pkgdir"/usr/bin/
}

sha512sums="
8dbf9841af0198ece0d5bb7cbbee7c4bf985c02c4c0ce6f594d1e3e0e7b39e68db43ad3d2dd2fa0d390098085763e75949cefbc027e7f49271db8dc52b9efa72  so-0.4.9.tar.gz
"
